package com.heima.seckill.service;


import com.baomidou.mybatisplus.extension.service.IService;
import com.heima.seckill.pojo.User;
import com.heima.seckill.vo.LoginVo;
import com.heima.seckill.vo.RespBean;
import org.springframework.util.StringUtils;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


/**
 * <p>
 *  服务类
 * </p>
 *
 * @author zhujia
 * @since 2022-04-19
 */
public interface IUserService extends IService<User> {

    RespBean doLogin(LoginVo loginVo, HttpServletResponse response, HttpServletRequest request);

    /**
     * 根据cookie 获取用户
     * @param userTicket
     * @return
     */
    User getUserByCookie(String userTicket,HttpServletRequest request,HttpServletResponse response);

    /**
     * 更新密码
     * @param userTicket
     * @param password
     * @param request
     * @param response
     * @return
     */
    RespBean userUpdate(String userTicket,String password,HttpServletRequest request,HttpServletResponse response);
}
